﻿CREATE PROCEDURE dbo.GetMessageSendByUser
	
	(
	@userId int
	)
	
AS
	select MessageId,InboxType,Sender,Recipient,Header,SendTime,Priority,RecReadMsgDate
	from [Messages] as MessageHeader where Sender = @userId
	FOR XML AUTO, ELEMENTS,ROOT('Messages');